const mongoose = require('mongoose')

const Schema = mongoose.Schema;

const tokenSchema = new Schema({
  appid: String,
  token: String,
  ticket: String,
  createTime: Number,
  expires: Number
});

tokenSchema.methods.isValid = async function () {
  console.log(this);
}

module.exports = mongoose.model('token', tokenSchema);